inherited frmSetMeterIndication: TfrmSetMeterIndication
  Left = 418
  Top = 263
  Width = 609
  Height = 369
  Caption = #1047#1072#1085#1077#1089#1077#1085#1080#1077' '#1087#1086#1082#1072#1079#1072#1085#1080#1081' '#1087#1086' '#1087#1088#1080#1073#1086#1088#1091' '#1091#1095#1077#1090#1072
  Constraints.MinHeight = 300
  Constraints.MinWidth = 600
  OldCreateOrder = True
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 13
  inherited Panel1: TPanel
    Top = 315
    Width = 601
    TabOrder = 3
    TabStop = True
    inherited BitBtn1: TBitBtn
      Left = 394
    end
    inherited BitBtn2: TBitBtn
      Left = 496
    end
  end
  inherited ToolBar1: TToolBar
    Top = 69
    Width = 601
    Height = 0
    Enabled = False
    TabOrder = 4
    Visible = False
    inherited ToolButton1: TToolButton
      Enabled = False
    end
    inherited ToolButton2: TToolButton
      Enabled = False
    end
    inherited ToolButton3: TToolButton
      Enabled = False
    end
    inherited ToolButton4: TToolButton
      Enabled = False
    end
  end
  object GroupBox1: TGroupBox [2]
    Left = 0
    Top = 69
    Width = 601
    Height = 171
    Align = alClient
    Caption = ' '#1055#1088#1080#1073#1086#1088' '#1091#1095#1077#1090#1072' '
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWindowText
    Font.Height = -11
    Font.Name = 'MS Sans Serif'
    Font.Style = [fsBold]
    ParentFont = False
    TabOrder = 1
    TabStop = True
    object dbgMeterInd: TDBGridEh
      Left = 2
      Top = 15
      Width = 597
      Height = 154
      Align = alClient
      DataGrouping.GroupLevels = <>
      DataSource = dsc_MeterList
      Flat = True
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      FooterColor = clWindow
      FooterFont.Charset = DEFAULT_CHARSET
      FooterFont.Color = clWindowText
      FooterFont.Height = -11
      FooterFont.Name = 'MS Sans Serif'
      FooterFont.Style = []
      Options = [dgEditing, dgTitles, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgConfirmDelete, dgCancelOnExit]
      OptionsEh = [dghFixed3D, dghHighlightFocus, dghClearSelection, dghDblClickOptimizeColWidth, dghDialogFind, dghColumnResize, dghColumnMove]
      ParentFont = False
      RowDetailPanel.Color = clBtnFace
      TabOrder = 0
      TitleFont.Charset = DEFAULT_CHARSET
      TitleFont.Color = clWindowText
      TitleFont.Height = -11
      TitleFont.Name = 'MS Sans Serif'
      TitleFont.Style = []
      UseMultiTitle = True
      VTitleMargin = 5
      OnColEnter = dbgMeterIndColEnter
      OnEnter = dbgMeterIndColEnter
      OnKeyUp = dbgMeterIndKeyUp
      Columns = <
        item
          Color = clInactiveCaptionText
          EditButtons = <>
          FieldName = 'METER_NUM'
          Footers = <>
          ReadOnly = True
        end
        item
          Color = clInactiveCaptionText
          EditButtons = <>
          FieldName = 'METER_TYPE'
          Footers = <>
          ReadOnly = True
        end
        item
          Color = clInactiveCaptionText
          EditButtons = <>
          FieldName = 'NAME'
          Footers = <>
          ReadOnly = True
        end
        item
          Color = clInactiveCaptionText
          EditButtons = <>
          FieldName = 'CAPACITY'
          Footers = <>
          ReadOnly = True
        end
        item
          Color = clInactiveCaptionText
          EditButtons = <>
          FieldName = 'SAY_IND'
          Footers = <>
          ReadOnly = True
        end
        item
          EditButtons = <>
          FieldName = 'NEW_PH'
          Footers = <>
        end
        item
          EditButtons = <>
          FieldName = 'PZERO'
          Footers = <>
        end>
      object RowDetailData: TRowDetailPanelControlEh
      end
    end
  end
  object GroupBox2: TGroupBox [3]
    Left = 0
    Top = 240
    Width = 601
    Height = 75
    Align = alBottom
    Caption = ' '#1055#1086#1082#1072#1079#1072#1085#1080#1103' '
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWindowText
    Font.Height = -11
    Font.Name = 'MS Sans Serif'
    Font.Style = [fsBold]
    ParentFont = False
    TabOrder = 2
    TabStop = True
    object Label1: TLabel
      Left = 22
      Top = 21
      Width = 68
      Height = 13
      Alignment = taRightJustify
      AutoSize = False
      Caption = #1055#1086#1082#1072#1079#1072#1085#1080#1103
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      ParentFont = False
    end
    object Label2: TLabel
      Left = 174
      Top = 21
      Width = 128
      Height = 13
      Alignment = taRightJustify
      AutoSize = False
      Caption = #1055#1077#1088#1077#1093#1086#1076#1086#1074' '#1095#1077#1088#1077#1079' 0'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      ParentFont = False
    end
    object Label7: TLabel
      Left = 22
      Top = 45
      Width = 68
      Height = 13
      Alignment = taRightJustify
      AutoSize = False
      Caption = #1055#1086#1090#1088#1077#1073#1083#1077#1085#1080#1077
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      ParentFont = False
    end
    object dbnePh: TDBNumberEditEh
      Left = 100
      Top = 18
      Width = 72
      Height = 19
      AlwaysShowBorder = True
      DataField = 'NEW_PH'
      DataSource = dsc_MeterList
      EditButtons = <>
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      Flat = True
      ParentFont = False
      TabOrder = 0
      Visible = True
      OnExit = dbnePhExit
    end
    object dbneZero: TDBNumberEditEh
      Left = 312
      Top = 18
      Width = 72
      Height = 19
      AlwaysShowBorder = True
      DataField = 'PZERO'
      DataSource = dsc_MeterList
      EditButtons = <
        item
          Style = ebsPlusEh
          OnClick = dbneZeroEditButtons0Click
        end
        item
          Style = ebsMinusEh
          OnClick = dbneZeroEditButtons1Click
        end>
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      Flat = True
      MaxValue = 1.000000000000000000
      MinValue = -1.000000000000000000
      ParentFont = False
      TabOrder = 1
      Visible = True
      OnExit = dbnePhExit
    end
    object dbnePotr: TDBNumberEditEh
      Left = 100
      Top = 42
      Width = 72
      Height = 19
      AlwaysShowBorder = True
      EditButtons = <>
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      Flat = True
      ParentFont = False
      TabOrder = 2
      Visible = True
      OnChange = dbnePotrChange
      OnExit = dbnePotrExit
    end
  end
  object GroupBox3: TGroupBox [4]
    Left = 0
    Top = 0
    Width = 601
    Height = 69
    Align = alTop
    Caption = ' '#1040#1082#1090' '
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWindowText
    Font.Height = -11
    Font.Name = 'MS Sans Serif'
    Font.Style = [fsBold]
    ParentFont = False
    TabOrder = 0
    object Label3: TLabel
      Left = 28
      Top = 19
      Width = 64
      Height = 13
      Alignment = taRightJustify
      AutoSize = False
      Caption = #1040#1082#1090' '#8470
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      ParentFont = False
    end
    object Label4: TLabel
      Left = 28
      Top = 43
      Width = 64
      Height = 13
      Alignment = taRightJustify
      AutoSize = False
      Caption = #1044#1072#1090#1072' '#1072#1082#1090#1072
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      ParentFont = False
    end
    object Label5: TLabel
      Left = 248
      Top = 18
      Width = 64
      Height = 13
      Alignment = taRightJustify
      AutoSize = False
      Caption = #1055#1077#1088#1080#1086#1076' '#1089
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      ParentFont = False
    end
    object Label6: TLabel
      Left = 296
      Top = 42
      Width = 17
      Height = 13
      Alignment = taRightJustify
      AutoSize = False
      Caption = #1087#1086
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      ParentFont = False
    end
    object DBEditEh1: TDBEditEh
      Left = 100
      Top = 16
      Width = 121
      Height = 19
      AlwaysShowBorder = True
      Color = clInactiveCaptionText
      DataField = 'ACT_ID'
      DataSource = dsc_MeterList
      EditButtons = <>
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      Flat = True
      ParentFont = False
      ReadOnly = True
      TabOrder = 0
      Visible = True
    end
    object DBDateTimeEditEh1: TDBDateTimeEditEh
      Left = 100
      Top = 40
      Width = 121
      Height = 19
      AlwaysShowBorder = True
      Color = clInactiveCaptionText
      DataField = 'BDATE'
      DataSource = dsc_MeterList
      Enabled = False
      EditButtons = <>
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      Flat = True
      Kind = dtkDateEh
      ParentFont = False
      ReadOnly = True
      TabOrder = 1
      Visible = True
    end
    object DBDateTimeEditEh2: TDBDateTimeEditEh
      Left = 320
      Top = 16
      Width = 85
      Height = 19
      AlwaysShowBorder = True
      Color = clInactiveCaptionText
      DataField = 'BDATE'
      DataSource = dsc_MeterList
      Enabled = False
      EditButtons = <>
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      Flat = True
      Kind = dtkDateEh
      ParentFont = False
      ReadOnly = True
      TabOrder = 2
      Visible = True
    end
    object DBDateTimeEditEh3: TDBDateTimeEditEh
      Left = 320
      Top = 40
      Width = 85
      Height = 19
      AlwaysShowBorder = True
      Color = clInactiveCaptionText
      DataField = 'EDATE'
      DataSource = dsc_MeterList
      Enabled = False
      EditButtons = <>
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      Flat = True
      Kind = dtkDateEh
      ParentFont = False
      ReadOnly = True
      TabOrder = 3
      Visible = True
    end
  end
  inherited ActionList1: TActionList
    Left = 160
    Top = 65528
    inherited aSave: TAction
      OnExecute = aSaveExecute
    end
    inherited aCancel: TAction
      OnExecute = aCancelExecute
    end
  end
  inherited PropStorage: TPropStorageEh
    Left = 116
    Top = 65528
  end
  object ds_MeterList: TpFIBDataSet
    UpdateSQL.Strings = (
      'UPDATE tmp_potr p'
      'SET '
      '    p.potr = :new_ph,'
      '    p.di_id = :pzero'
      'WHERE'
      '    p.dogovor_id is null'
      '    ')
    SelectSQL.Strings = (
      'select m.id, m.meter_num, m.meter_type, m.name, mt.capacity,'
      
        '       (select rph from proc_meter_get_ind (m.id, null, maa.id))' +
        ' as say_ind,'
      '       maa.id as act_id, maa.act_date, maa.bdate, maa.edate,'
      
        '       (select rph from proc_meter_get_ind (m.id, null, maa.id))' +
        ' as new_ph,'
      '       cast(0 as integer) as pzero,'
      '       mt.precis, maa.act_type'
      '  from meters m, meter_types mt, m_accpoint_acts maa'
      '  where mt.id = m.meter_type'
      '    and m.accpoint_id = maa.accpoint_id'
      '    and maa.id = :pact_id'
      
        '    and exists(select 1 from proc_meter_get_status (m.id, maa.ed' +
        'ate)'
      '               where rstatus = 1)'
      'order by 1')
    AfterOpen = ds_MeterListAfterScroll
    AfterScroll = ds_MeterListAfterScroll
    Transaction = LocalTrans
    Database = MAINDM.pMainDatabase
    Left = 268
    Top = 116
    object ds_MeterListMETER_NUM: TFIBStringField
      DisplayLabel = #8470
      DisplayWidth = 10
      FieldName = 'METER_NUM'
      EmptyStrToNull = True
    end
    object ds_MeterListMETER_TYPE: TFIBIntegerField
      DisplayLabel = #1058#1080#1087
      DisplayWidth = 10
      FieldName = 'METER_TYPE'
    end
    object ds_MeterListNAME: TFIBStringField
      DisplayLabel = #1053#1072#1079#1074#1072#1085#1080#1077
      DisplayWidth = 20
      FieldName = 'NAME'
      Size = 60
      EmptyStrToNull = True
    end
    object ds_MeterListCAPACITY: TFIBIntegerField
      DisplayLabel = #1047#1085#1072#1095#1085#1086#1089#1090#1100
      FieldName = 'CAPACITY'
    end
    object ds_MeterListID: TFIBIntegerField
      FieldName = 'ID'
    end
    object ds_MeterListSAY_IND: TFIBBCDField
      DisplayLabel = #1058#1077#1082#1091#1097#1080#1077' '#1087#1086#1082#1072#1079#1072#1085#1080#1103
      FieldName = 'SAY_IND'
      Size = 3
      RoundByScale = True
    end
    object ds_MeterListACT_DATE: TFIBDateField
      FieldName = 'ACT_DATE'
    end
    object ds_MeterListBDATE: TFIBDateField
      FieldName = 'BDATE'
    end
    object ds_MeterListEDATE: TFIBDateField
      FieldName = 'EDATE'
    end
    object ds_MeterListACT_ID: TFIBIntegerField
      FieldName = 'ACT_ID'
    end
    object ds_MeterListNEW_PH: TFIBBCDField
      DisplayLabel = #1053#1086#1074#1099#1077' '#1087#1086#1082#1072#1079#1072#1085#1080#1103
      FieldName = 'NEW_PH'
      Size = 3
      RoundByScale = True
    end
    object ds_MeterListPZERO: TFIBIntegerField
      DisplayLabel = #1055#1077#1088#1077#1093#1086#1076#1086#1074' '#1095#1077#1088#1077#1079' 0'
      FieldName = 'PZERO'
    end
    object ds_MeterListPRECIS: TFIBIntegerField
      FieldName = 'PRECIS'
    end
    object ds_MeterListACT_TYPE: TFIBIntegerField
      FieldName = 'ACT_TYPE'
    end
  end
  object qSetInd: TpFIBQuery
    Transaction = UpdateTrans
    Database = MAINDM.pMainDatabase
    SQL.Strings = (
      'INSERT INTO METER_IND ('
      '    METER_ID,'
      '    ACT_ID,'
      '    PH,'
      '    PZERO) '
      'VALUES ('
      '    :METER_ID,'
      '    :ACT_ID,'
      '    :PH,'
      '    :PZERO)')
    Left = 404
    Top = 105
    qoStartTransaction = True
  end
  object dsc_MeterList: TDataSource
    DataSet = ds_MeterList
    Left = 300
    Top = 116
  end
  object LocalTrans: TpFIBTransaction
    DefaultDatabase = MAINDM.pMainDatabase
    TimeoutAction = TARollback
    Left = 232
    Top = 116
  end
  object UpdateTrans: TpFIBTransaction
    DefaultDatabase = MAINDM.pMainDatabase
    TimeoutAction = TARollback
    Left = 372
    Top = 104
  end
end
